package com.weixin.project.Dao;

import com.weixin.project.Entity.UserFavVideo;
import com.weixin.project.Entity.Video;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface UserFavVideoDao extends JpaRepository<UserFavVideo, Integer> {
    UserFavVideo getUserFavVideoByUserIdAndAndVideoId(Integer userId, Integer videoId);
    Integer countUserFavVideosByVideoId(Integer videoId);
    Page<UserFavVideo> getUserFavVideosByUserId(Integer userId, Pageable pageable);
    Integer countUserFavVideosByUserId(Integer userId);
    List<UserFavVideo> getUserFavVideosByVideoId(Integer videoId);
}
